package com.example.forceoffline;

import androidx.appcompat.app.AppCompatActivity;

import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void sendBroadcast(View view) {
        Intent intent = new Intent("com.example.offLine");
        intent.setComponent(new ComponentName("com.example.mywechat","com.example.mywechat.MyReceiver"));
        sendBroadcast(intent,null);
    }
}